package com.ziyun.erp.modules.invoice.dao;

import com.ziyun.erp.modules.invoice.entity.OrderInvoiceRelevancyEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 订单发票关联表
 * 
 * @author gaosheng
 * @email 
 * @date 2018-08-25 15:13:17
 */
@Service("orderInvoiceRelevancyDao")
public interface OrderInvoiceRelevancyDao extends BaseMapper<OrderInvoiceRelevancyEntity> {

    /**
     *  批量插入订单发票关联信息
     * @param list 订单关联信息
     * @param oiId 发票id
     * @return
     */
    int saveBatch(@Param("list") List<OrderInvoiceRelevancyEntity> list, @Param("oiId") Integer oiId);

    /**
     *  根据发票ID修改信息
     * @param map 修改参数
     * @param oirOiId 发票ID
     * @return
     */
    int updateByOirOiId(@Param("map") Map<String, Object> map, @Param("oirOiId") Integer oirOiId);
}
